Item Property (Attachments Collection)
The Item
property returns a single Attachment object from the collection. Read-only.
Syntax
objAttachColl.Item(index)
index
A long
integer that ranges from 1 to object.Count, or a string that
specifies the name of the object.
Data Type
Object
Remarks
The Item
property works like an accessor property for small collections.
The Item
property is the default property of an Attachments collection, meaning that
Attachments(index) is syntactically equivalent to Attachments.Item(index)
in Visual Basic code.
Example
' from Util_SmallCollectionCount(objColl As Object)
' This sample obtains the collection as a variable
' so it *must* use the Item property
Dim strItemName(100) as String
' error
handling omitted from this fragment...
For i = 1
To objColl.Count Step 1
strItemName(i) = objColl.Item(i).Name
If 100
= i Then ' max size of string array
Exit Function
End If
Next i
See Also
Count Property (Attachments Collection)